package wuziqi;
// 游戏工厂 - 创建不同类型的游戏
class GameFactory {
    public static BoardGameEngine createTicTacToe() {
        return new BoardGameEngine(new TicTacToeConfig());
    }
    
    public static BoardGameEngine createGomoku() {
        return new BoardGameEngine(new GomokuConfig());
    }
    
    // 可以轻松添加更多游戏类型
    public static BoardGameEngine createCustomGame(int size, int winCount) {
        return new BoardGameEngine(new GameConfig() {
            @Override public int getBoardSize() { return size; }
            @Override public int getWinCount() { return winCount; }
            @Override public char getPlayer1Symbol() { return 'X'; }
            @Override public char getPlayer2Symbol() { return 'O'; }
            @Override public char getEmptySymbol() { return '-'; }
        });
    }
}
